ls_preprocessed <- preprocess_rna(path_rnaseq = 'rnaseq.RData', correct_batch = T, correct_gender = F)
print(ls_preprocessed$pbatch_bf)
print(ls_preprocessed$pgender_bf)
print(ls_preprocessed$pbatch_af)
print(ls_preprocessed$pgender_af)
DE_res <- DE_analysis(ls_preprocessed,
GeneBased=FALSE,
pDataBased=TRUE,
NewCondition=FALSE,
cond_nm='CANARY',
two_levels=c('P','G'),
reference = 'G',
correct_gender=FALSE)
## Unlist done
## Labeling done
## Filtering done
## factor levels were dropped which had no samples
## Design done
## Warning: Column `gene`/`ENSEMBL` joining character vector and factor, coercing
## into character vector
## vsd symbols done
## using pre-existing size factors
## estimating dispersions
## gene-wise dispersion estimates
## mean-dispersion relationship
## final dispersion estimates
## fitting model and testing
## -- replacing outliers and refitting for 2089 genes
## -- DESeq argument 'minReplicatesForReplace' = 7
## -- original counts are preserved in counts(dds)
## estimating dispersions
## fitting model and testing
## DESeq done
## using 'normal' for LFC shrinkage, the Normal prior from Love et al (2014).
##
## Note that type='apeglm' and type='ashr' have shown to have less bias than type='normal'.
## See ?lfcShrink for more details on shrinkage type, and the DESeq2 vignette.
## Reference: https://doi.org/10.1093/bioinformatics/bty895
## Warning: Column `gene`/`ENSEMBL` joining character vector and factor, coercing
## into character vector
## res symbols done
## list done
heatmap_200(DE_res$res_df, DE_res$vsd_mat_sym, DE_res$meta_data, DE_res$pData_rnaseq)
volcano_plot(DE_res$res_df, gene=NULL, p_title='CANARY: G vs P')
CANARY Good prognosis (G) is the reference. When sample is P, pathways shown below are up- or down- regulated
fgsea_res <- fgsea_analysis(DE_res)
## Warning in fgsea(pathways = gmtPathways(pthw_path), stats = ranks, nperm = 1000): There are ties in the preranked stats (0.13% of the list).
## The order of those tied genes will be arbitrary, which may produce unexpected results.
## Warning in fgsea(pathways = gmtPathways(pthw_path), stats = ranks, nperm = 1000): There are ties in the preranked stats (0.13% of the list).
## The order of those tied genes will be arbitrary, which may produce unexpected results.
## Warning in fgsea(pathways = gmtPathways(pthw_path), stats = ranks, nperm = 1000): There are ties in the preranked stats (0.13% of the list).
## The order of those tied genes will be arbitrary, which may produce unexpected results.
## Warning in fgsea(pathways = gmtPathways(pthw_path), stats = ranks, nperm = 1000): There are ties in the preranked stats (0.13% of the list).
## The order of those tied genes will be arbitrary, which may produce unexpected results.
## Warning in fgsea(pathways = gmtPathways(pthw_path), stats = ranks, nperm = 1000): There are ties in the preranked stats (0.13% of the list).
## The order of those tied genes will be arbitrary, which may produce unexpected results.
## Warning in fgsea(pathways = gmtPathways(pthw_path), stats = ranks, nperm = 1000): There are ties in the preranked stats (0.13% of the list).
## The order of those tied genes will be arbitrary, which may produce unexpected results.
## Warning in fgsea(pathways = gmtPathways(pthw_path), stats = ranks, nperm = 1000): There are ties in the preranked stats (0.13% of the list).
## The order of those tied genes will be arbitrary, which may produce unexpected results.
## Warning in fgsea(pathways = gmtPathways(pthw_path), stats = ranks, nperm = 1000): There are ties in the preranked stats (0.13% of the list).
## The order of those tied genes will be arbitrary, which may produce unexpected results.
## Warning in fgsea(pathways = gmtPathways(pthw_path), stats = ranks, nperm = 1000): There are ties in the preranked stats (0.13% of the list).
## The order of those tied genes will be arbitrary, which may produce unexpected results.
fgsea_plot(fgsea_res$res_hm, pathways_title='Hallmark', condition_name='CANARY: G vs P')
fgsea_plot(fgsea_res$res_c1, pathways_title='C1 positional genes', condition_name='CANARY: G vs P')
fgsea_plot(fgsea_res$res_c2, pathways_title='C2 curated genes', condition_name='CANARY: G vs P')
fgsea_plot(fgsea_res$res_c3, pathways_title='C3 regulatory target genes', condition_name='CANARY: G vs P')
fgsea_plot(fgsea_res$res_c4, pathways_title='C4 cancer', condition_name='CANARY: G vs P')
fgsea_plot(fgsea_res$res_c5, pathways_title='C5 GO genes', condition_name='CANARY: G vs P')
fgsea_plot(fgsea_res$res_c6, pathways_title='C6 oncogenic', condition_name='CANARY: G vs P')
fgsea_plot(fgsea_res$res_c7, pathways_title='C7 immunologic', condition_name='CANARY: G vs P')
fgsea_plot(fgsea_res$res_msg, pathways_title='All signatures', condition_name='CANARY: G vs P')